package com.nefu.softlab.xjwc.service;

import com.nefu.softlab.xjwc.model.Project;
import com.nefu.softlab.xjwc.utils.JSONResult;
import com.nefu.softlab.xjwc.utils.XJWCException;

import java.util.List;
import java.util.Map;

/**
 * @author : Ar1es
 * @date : 2020/2/8
 * @since : Java 8
 */
public interface ProjectService {

    int insertProject(Project project) throws XJWCException;

    int updateProject(Project project) throws XJWCException;

    int deleteProject(Project project) throws XJWCException;

    int deleteProject1(Project project) throws XJWCException;

    Object selectAllProject(Project project) throws XJWCException;

    List<Map<String, Object>> selectProjectByKeyword(String keyword) throws XJWCException;

    List<Map<String, Object>> selectSortProject() throws XJWCException;

    Object selectProIdByActivityId(Integer activityId, String name) throws XJWCException;


    /**
     * 项目详细信息
     * @param projectId
     * @return
     * @throws XJWCException
     */
    Map<String, Object> selectProjectDetail(Integer projectId) throws XJWCException;


    /**
     * 根据activityId和userId查询项目
     * @param userId
     * @param activityId
     * @return
     * @throws XJWCException
     */
    List<Map<String, Object>> getProjectByUserAndActivity(String userId, Integer activityId) throws XJWCException;

    /**
     * 根据活动id删除所有项目
     * @param activityId
     * @return
     */
    boolean deleteProjectsByActivityId(Integer activityId);
}
